def tridiagonal_solver(n, A, b):
    # 前向消去
    c = [0] * n  # c[i]是对角线元素c_i
    d = [0] * n  # d[i]是修正后的b值 d_i

    c[0] = A[0][1] / A[0][0]
    d[0] = b[0] / A[0][0]

    for i in range(1, n):
        denominator = A[i][i] - A[i][i - 1] * c[i - 1]
        c[i] = A[i][i + 1] / denominator if i < n - 1 else 0
        d[i] = (b[i] - A[i][i - 1] * d[i - 1]) / denominator

    # 回代
    x = [0] * n
    x[n - 1] = d[n - 1]

    for i in range(n - 2, -1, -1):
        x[i] = d[i] - c[i] * x[i + 1]

    return x


# 输入部分
n = int(input())  # 读取矩阵大小n
A = []
b = []

# 读取三对角矩阵A和向量b
for i in range(n):
    row = list(map(float, input().split()))
    A.append(row[:-1])  # 获取前n列作为A的元素
    b.append(row[-1])  # 最后一列是b的元素

# 使用追赶法求解
x = tridiagonal_solver(n, A, b)

# 输出结果，保留3位小数
for xi in x:
    print("%.3f" % xi, end=' ')

#不想写了 已经深夜2：37了


#print(get_LU(A))